/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vn.com.sml.SEFM.BUS;

import java.util.Iterator;
import java.util.List;
import javax.persistence.RollbackException;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.SystemException;
import vn.com.sml.SEFM.DAO.IPDAO;
import vn.com.sml.SEFM.domain.Countries;
import vn.com.sml.SEFM.domain.Ip;
/**
 *
 * @author Tunp
 */
public class IPBUS {
   
    public static List<Ip> listIp() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException{
        return IPDAO.listIps();
    }

    public Ip getIpById(int id) throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
        return IPDAO.getIpById(id);
    }
    
    public static Countries getIpCountriesById(int id) 
    {
        return IPDAO.getIpCountriesById(id);
    }

    public List<Ip> listIp(String search_col,String search_text) {
        return IPDAO.listIps(search_col,search_text);
    }

    public Integer saveIP(Ip ip) {
        return IPDAO.saveIP(ip);
    }
}
